﻿@model Enter.Mvc.Mall.Model.Shop.OpenShopModel
@{
    ViewBag.Title = "openShopBasic";
    Layout = "~/Views/Shared/_MemberCenterLayout.cshtml";
}
<script src="../../Scripts/ckeditor/ckeditor.js" type="text/javascript"></script>
<script src="../../Scripts/ckfinder/ckfinder.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("#btn_submit").click(fromValidator);


        getArea('0');
    });

    function getArea(AreaNo) {
    
    $.post("/Common/GetArea", { "AreaNo": AreaNo }, function (data) {
        var dataList = data.list;
        var arr = "";

        if (dataList.length > 0) {
            arr += '<select  id="shi">';
            arr += '<option value="">-请选择-</option>';
            for (var i = 0; i < dataList.length; i++) {
                var area = dataList[i];
                arr += '<option value="' + area.AreaNO + '">' + area.AreaName + '</option>';
            }
            arr += '</select>\n';

            div = document.createElement('div');
            div.innerHTML = arr;
            var select = div.firstChild;

            select.onchange = function () {
                alert('dd');
            }
            $("#area").html(div.innerHTML);
        }


    }, 'json');
    }

    function fromValidator() {
        if ($("#SName").val() == "") {
            return false;
        }
        if ($("#SAdress").val() == "") {
            return false;
        }


        $("#Memo").val(CKEDITOR.instances.Memo.getData());
        if ($("#Memo").val() == "") {
            return false;
        }
        $.post("/Shop/openShopBasic", $("#shopForm").serialize(), function (data) {
            if (data.ResultCode == "00") {
                //  window.location.href = "/User/RegisterSuccess";
                alert(data.ResultMsg)
            } else {
                $("#divMsg").html(data.ResultMsg);
                alert(data.ResultMsg)

            }

        }, "json");


    }
</script>
<style>
    .info-tip
    {
        background: none repeat scroll 0 0 #FFFFE5;
        border: 1px solid #F39A00;
        display: block;
        float: left;
        margin-left: 10px;
        margin-top: 2px;
        padding: 2px 10px 2px 6px;
    }
    .info-tip i
    {
        background: url("http://img02.taobaocdn.com/tps/i2/T1tK49XiBDXXXXXXXX-76-110.png") no-repeat scroll 0 -95px transparent;
        display: block;
        float: left;
        height: 12px;
        margin: 2px 6px 0 0;
        width: 10px;
    }
</style>
<div class="main pageWidth pb">
    @{Html.RenderAction("TopNav", "Member", new { pageType = 2 });}
    <div class="clearself">
        <div class="left">
            @{Html.RenderAction("MemberMenu", "Member", new { pageType = 2 });}
        </div>
        <div class="right">
            <div class="position">
                <a href="#；">我是卖家</a> &gt; <a href="#；">我要开店</a> &gt; 店铺基本信息</div>
            <div class="infoWrap">
                <p class="top-tip">
                    <span class="info-tip"><i></i>填写详细的店铺信息，我们将为你提供更专业、更有针对性的经营信息。带 <em>*</em> 为必填项。
                    </span>
                </p>
                <form id="shopForm">
                <table border="0" cellpadding="0" cellspacing="0" class="InfoTb">
                    <tr>
                        <td width="150" align="right">
                            登录名/昵称：
                        </td>
                        <td>
                            <span>@Enter.Mvc.Mall.Model.User.UserInfo.CurrentUser.UserName</span>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <span class="red">*</span>店铺名称：
                        </td>
                        <td>
                            <input id="SName" name="SName" type="text" class="text disable" value="" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            店铺标志：
                        </td>
                        <td>
                            <img id="imglogo" src="../../Content/images/scimg.jpg" />
                            <p class="upload-con">
                                <span class="info-tip img-erro"><i></i><span id="imgmsg">文件格式GIF、JPG、JPEG、PNG文件大小80K以内，建议尺寸80PX*80PX</span></span>
                            </p>
                            @{Html.RenderAction("uploadImg", "Common", new { imgType = @Enter.Config.ImgRootType.ShopLogo, imgID = "imglogo", hfImgUrl = "SLogo", msg = "imgmsg" });}
                            <input id="SLogo" name="SLogo" value="ssss" type="hidden" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <span class="red">*</span>店铺类目：
                        </td>
                        <td>
                            <select name="SType" id="SType" class="" style="width: 180px;">
                                <option selected="selected" value="13">手机 </option>
                                <option value="1043">笔记本电脑 </option>
                                <option value="11">电脑硬件/台式机/网络设备 </option>
                                <option value="1103">IP卡/网络电话/在线影音充值 </option>
                                <option value="12">MP3/MP4/iPod/录音笔 </option>
                                <option value="17">数码相机/摄像机/图形冲印 </option>
                                <option value="1048">3C数码配件市场 </option>
                                <option value="1046">家用电器/hifi音响/耳机 </option>
                                <option value="1041">移动联通充值中心/IP长途 </option>
                                <option value="1105">闪存卡/U盘/移动存储 </option>
                                <option value="37">男装 </option>
                                <option value="1106">运动鞋 </option>
                                <option value="1104">个人护理/保健/按摩器材 </option>
                                <option value="1102">腾讯QQ专区 </option>
                                <option value="14">女装/流行女装 </option>
                                <option value="1056">女鞋 </option>
                                <option value="1055">女士内衣/男士内衣/家居服 </option>
                                <option value="15">彩妆/香水/护肤/美体 </option>
                                <option value="23">珠宝/钻石/翡翠/黄金 </option>
                                <option value="31">箱包皮具/热销女包/男包 </option>
                                <option value="1044">品牌手表/流行手表 </option>
                                <option value="1054">饰品/流行首饰/时尚饰品 </option>
                                <option value="18">运动/瑜伽/健身/球迷用品 </option>
                                <option value="1082">流行男鞋/皮鞋 </option>
                                <option value="1045">户外/军品/旅游/机票 </option>
                                <option value="1040">ZIPPO/瑞士军刀/饰品/眼镜 </option>
                                <option value="22">汽车/配件/改装/摩托/自行车 </option>
                                <option value="24">居家日用/厨房餐饮/卫浴洗浴 </option>
                                <option value="1122">时尚家饰/工艺品/十字绣 </option>
                                <option value="1050">家具/家具定制/宜家代购 </option>
                                <option value="1049">床上用品/靠垫/窗帘/布艺 </option>
                                <option value="21">办公设备/文具/耗材 </option>
                                <option value="36">网络游戏装备/游戏币/帐号/代练 </option>
                                <option value="26">装潢/灯具/五金/安防/卫浴 </option>
                                <option value="1051">保健品/滋补品 </option>
                                <option value="29">食品/茶叶/零食/特产 </option>
                                <option value="1020">母婴用品/奶粉/孕妇装 </option>
                                <option value="16">电玩/配件/游戏/攻略 </option>
                                <option value="30">玩具/动漫/模型/卡通 </option>
                                <option value="35">网络游戏点卡 </option>
                                <option value="34">书籍/杂志/报纸 </option>
                                <option value="33">音乐/影视/明星/乐器 </option>
                                <option value="20">古董/邮币/字画/收藏 </option>
                                <option value="32">宠物/宠物食品及用品 </option>
                                <option value="27">成人用品/避孕用品/情趣内衣 </option>
                                <option value="1042">网店/网络服务/软件 </option>
                                <option value="1053">演出/吃喝玩乐折扣券 </option>
                                <option value="1047">鲜花速递/蛋糕配送/园艺花艺 </option>
                                <option value="1062">童装/婴儿服/鞋帽 </option>
                                <option value="1153">运动服 </option>
                                <option value="1154">服饰配件/皮带/帽子/围巾 </option>
                                <option value="2182">医药保健 </option>
                                <option value="2183">吃喝玩乐折扣券 </option>
                                <option value="2184">房产 </option>
                                <option value="2185">外卖/外送/订餐服务 </option>
                                <option value="2202">个性定制/设计服务/DIY </option>
                                <option value="2222">本地化生活服务 </option>
                                <option value="2223">电影/演出/体育赛事 </option>
                                <option value="1345">旅行社 </option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            店铺简介：
                        </td>
                        <td>
                            <input id="STag" name="STag" type="text" class="text" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <span class="red">*</span>联系地址：
                        </td>
                        <td>
                            <div id="area">
                            </div>
                            <input id="SAdress" name="SAdress" type="text" class="text" style="width: 450px;" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <span class="red">*</span>店铺介绍：
                        </td>
                        <td>
                            <textarea cols="90" rows="10" id="Memo" name="Memo" style="width: 450px; height: 80px;"></textarea>
                            <script type="text/javascript">
                                $(function () {

                                    var editor = CKEDITOR.replace('Memo');
                                    CKFinder.SetupCKEditor(editor, '/Scripts/ckfinder/');
                                });
                            </script>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                        </td>
                        &nbsp;<td>
                            <input type="checkbox" />
                            我同意并遵守淘宝网的商品<a target="_blank" href="#;" class="blue">发布规则</a> 及<a target="_blank"
                                href="#;" class="blue">淘宝规则</a>。诚信经营，抵制炒作！
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                        </td>
                        &nbsp;<td>
                            <input type="checkbox" />
                            我已经阅读并同意签署消费者保证服务协议，为消费者提供更优秀的服务<a target="_blank" class="blue" href="#;">查看协议详情&gt;&gt;</a>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div id="divMsg">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            <input id="btn_submit" type="button" class="btn" value="保存" />
                        </td>
                    </tr>
                </table>
                </form>
            </div>
        </div>
    </div>
</div>
